[PATCH] src: fix possible dereference of null pointer
authorEusgor <100363036+Eusgor@users.noreply.github.com>
Thu, 29 May 2025 20:01:48 +0000 (02:01 +0600)
committerJérémy Lal <kapouer@melix.org>
Thu, 5 Mar 2026 10:05:11 +0000 (11:05 +0100)
commitedd8164fb14b1cdd0985eeb1ae3e7307c08ae8e6
tree61907242dfe3304e359572d65f9f8eda2fe25050
parent1f125d1e7e7ca084ff2f9df7f7b0f6191abec376
[PATCH] src: fix possible dereference of null pointer

There is a CHECK_NOT_NULL check before dereferencing node_env on
line 710 in the "if" block, but there is no CHECK_NOT_NULL check before
dereferencing node_env on line 721. Maybe it makes sense to put
CHECK_NOT_NULL right after calling the Environment::GetCurrent function.

PR-URL: https://github.com/nodejs/node/pull/58459
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Gbp-Pq: Topic sec
Gbp-Pq: Name 17-fix-possible-dereference-of-null-pointer.patch
src/node_api.cc